package com.hsnn.medstgmini.sys.model;

/**
 * @category 权限类型
 * @author CCL
 *
 */
public enum PrivilegeType {

	system(0, "系统"), module(1, "模块"), menu(2, "菜单"), button(3, "按钮");

	private int key;
	private String value;

	private PrivilegeType(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public static String getName(int key) {
		for (PrivilegeType pt : PrivilegeType.values()) {
			if (pt.key == key) {
				return pt.value;
			}
		}
		return "";
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
